<template>
    <div>
        <mt-header :title="tap">
            <router-link to="" slot="left">
              <mt-button icon="back" @click="goBack()">返回</mt-button>
            </router-link>
        </mt-header>
    </div>
</template>
<script>
export default {
  data() {
    return {
      // title: "首页"
    };
  },
  props:['tap'],
  methods: {
    goBack() {
      //返回上一级页面
      this.$router.back(-1);
    }
  },
  watch: {
    // "$route.path": function(newVal) {
    //   if (newVal === "/home") {
    //     this.title = "首页";
    //   } else if (newVal === "/member") {
    //     this.title = "会员";
    //   } else if (newVal === "/shopcar") {
    //     this.title = "购物车";
    //   } else if (newVal === "/search") {
    //     this.title = "搜索";
    //   }else if (newVal === '/home/newsInformation'){
    //       this.title='新闻资讯'
    //   }
    // }
  }
};
</script>
<style scoped>
</style>


